<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>获取vue对象中不同类型的数据</title>
</head>
<body>
    <div id="app">
        <span>{{msg}}</span><br>
        <table>
            <tr>
                <td>编号</td>
                <td>姓名</td>
                <td>性别</td>
            </tr>
            <tr>
                <td>{{person.id}}</td>
                <td>{{person.username}}</td>
                <td>{{person.sex}}</td>
            </tr>
        </table><br>
        <ul>
            <li v-for="val in arr">
                {{val}}
            </li>
        </ul>
        <ul>
            <li v-for="u in personList">
                {{u.id}}--{{u.username}}--{{u.sex}}
            </li>

        </ul>

    </div>

</body>
<script src="js/vue.js"></script>
<script>
    new Vue({
        el:'#app',
        data:{
            msg:'hello world',
            person:{
                id:1,
                username:'diaochan',
                sex:'women'
            },
            arr:["a","b","c"],
            personList:[
                {
                    id: 1,
                    username: 'diaochan',
                    sex: 'women'
                },
                {
                    id: 2,
                    username: 'zhuge',
                    sex: 'man'
                },
                {
                    id: 3,
                    username: 'zhangfei',
                    sex: 'man'
                }
            ]
        }
    })

</script>
</html>